package com.xiaoyu.auth.controller;

import lombok.AllArgsConstructor;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("encode")
@RestController
@AllArgsConstructor
public class EncodeController {
    @RequestMapping("test")
    public void test() {
        System.out.println(BCrypt.hashpw("secret", BCrypt.gensalt()));
        System.out.println(BCrypt.checkpw("secret", "$2a$10$jHPWu2ScGNIPxw8M07Uw6umCcejbfJRS7w6Xpn8S/uCKxyQwCXHfC"));
    }
}
